//
//  YKLoginRegisterViewController.m
//  baisi
//
//  Created by 吴高烽 on 16/9/11.
//  Copyright © 2016年 吴高烽. All rights reserved.
//

#import "YKLoginRegisterViewController.h"

@interface YKLoginRegisterViewController ()
@property (weak, nonatomic) IBOutlet UITextField *phoneTF;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *leadingM;
@property (weak, nonatomic) IBOutlet UIButton *registerBtn;

@end

@implementation YKLoginRegisterViewController

- (void)viewDidLoad {
    [super viewDidLoad];
//    1.到控件的头文件中查看属性或者方法来改变
// 文字属性 -- 富文本
//    NSMutableDictionary *attrs = [NSMutableDictionary dictionary];
//    attrs[NSForegroundColorAttributeName] = [UIColor grayColor];
//    NSMutableAttributedString *placehoder = [[NSMutableAttributedString alloc]initWithString:@"手机号" attributes:attrs];

    //    NSMutableAttributedString *placehoder = [[NSMutableAttributedString alloc]initWithString:@"手机号"];
//    [placehoder setAttributes:@{NSForegroundColorAttributeName:[UIColor greenColor]} range:NSMakeRange(0, 1)];
//    UITextField *;
//    self.phoneTF.attributedPlaceholder = placehoder ;
}
-(UIStatusBarStyle)preferredStatusBarStyle{
    return UIStatusBarStyleLightContent ;
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
- (IBAction)showLoginRegister:(UIButton *)sender {
    if (self.leadingM.constant==0) {
        [self.registerBtn setTitle:@"已有账号?" forState:UIControlStateNormal];
        self.leadingM.constant -=self.view.width ;
    }else{
        [self.registerBtn setTitle:@"注册账号" forState:UIControlStateNormal];

        self.leadingM.constant = 0 ;
    }
    [UIView animateWithDuration:0.2 animations:^{
        [self.view layoutIfNeeded];
    }];
}
- (IBAction)goBack:(id)sender {
    [self dismissViewControllerAnimated:YES completion:nil];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
